<script>
$(document).ready(function(){      
        $("#id_anho").change(function(){
			
            if($(this).val()!=""){
                var dato=$(this).val();
				
				
                $("#imgbloque").show();
                $.ajax({
                    type:"POST",
                    dataType:"html",
                    url: "<?php echo base_url(); ?>site/ciclo_select",
                    data:"numerojs="+dato,
                    success:function(msg){
                        $("#id_ciclo").empty().removeAttr("disabled").append(msg);
                        $("#imgbloque").hide();
                        $("#id_ciudad").empty().attr("disabled","disabled");
                    }
                });
            }else{
                $("#id_ciclo").empty().attr("disabled","disabled");
                $("#id_ciudad").empty().attr("disabled","disabled");
            }  
        });
        
		$("#id_ciclo").change(function(){
            if($(this).val()!=""){
                var dato=$(this).val();
				var dato1=$("#id_anho").val();
				$("#imgtema").show();
                $.ajax({
                    type:"POST",
                    dataType:"html",
                    url: "<?php echo base_url(); ?>site/uni_acad_select",
                    data:"anhojs="+dato1+"&ciclojs="+dato,
                    success:function(msg){
                        $("#id_uni_acad").empty().removeAttr("disabled").append(msg);
                        $("#imgtema").hide();
                    }
                });
            }else{
                $("#id_uni_acad").empty().attr("disabled","disabled");
            }  
        });
    
	
	});
	
</script>
	
	<?php
		$attributes = array('class' => 'rmis10', 'id' => 'rmis10', 'target' => 'foo', 'onSubmit' => 'window.open("", "foo", "width=450,height=300,status=yes,resizable=yes,scrollbars=yes")');
		//$js = 'onSubmit="window.open("", "foo", "width=450,height=300,status=yes,resizable=yes,scrollbars=yes")"';
		echo form_open('site/reporte_RED', $attributes);
	?>
	
	<p>
    Anho:<br>
    <select name="id_anho" id="id_anho">
        <option value="-1">SELECCIONAR</option>
        <?php
            foreach($report_eval_alumn as $i => $dato)
            {
                echo '<option value="'.$dato['numero_anho'].'">';
                echo $dato['numero_anho'];
                echo '</option>';
            }
        ?>
    </select>
    </p>
   
   <p>
    Ciclo:<br>
    <select name="id_ciclo" id="id_ciclo"  disabled="disabled">
    </select>
    <img src="<?php echo base_url(); ?>source/image/spinner5.gif" style="display:none;" alt="Cargando" id="imgbloque"/>
    </p>
    
	<p>
    Unidad Academica:<br>
    <select name="id_uni_acad" id="id_uni_acad" disabled="disabled">
    </select>
    <img src="<?php echo base_url(); ?>source/image/spinner5.gif" style="display:none;" alt="Cargando" id="imgtema"/>
    </p>
	
	
	
	<?php 
	
	echo form_submit('mysubmit', 'Generar Reporte!'); ?>
	
